package com.geese.module.business.dao;

import com.geese.common.entity.Business;
import com.geese.module.business.vo.BusinessVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BusinessMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Business record);

    int insertSelective(Business record);

    Business selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Business record);

    int updateByPrimaryKey(Business record);

    List<Business> findAll(BusinessVO businessVo);

    int auditByIds(List list);

    int lockByIds(List list);

    Business getdetails();

    /**
     * 根据userId获取商家
     */
    Business findByUserId(@Param("userId") Integer userId);

    int lockById(@Param("id") int id);

    int auditById(@Param("id") int id);



    ////////////////////////2.0////////////////////

    List<Business> selectByIdsIgnoreDel(@Param("ids") List<Integer> businessIds);

    /**
     * 获取所有已通过审核的商家
     * @return
     */
    List<Business> findAllActive();

}